package com.example.base.job;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

@Data
public class JobModel {


    private Integer id;
    /**
     *任务名称
     */
    private String jobname;

    /**
     * 任务执行时间
     */
    private String cron;


    /**
     *
     */
    private String clazz;

    /**
     *
     */
    private String type;

    /**
     *
     */
    private String methodname;

    /**
     *
     */
    private String groupName;

    /**
     *
     */
    private String params;


    /**
     *
     */
    private String status;

    @TableField(exist = false)
    private String statuName;

    public String getStatuName() {
        if(this.status!=null){
            QuartzStatusEnum[] enums=QuartzStatusEnum.values();
            for(QuartzStatusEnum en:enums){
                if(en.getStatus().equals(status)){
                    this.statuName = en.getStatusName();
                    break;
                }
            }
        }
        return statuName;
    }


    private String methodclazz;

    private String annotationName;

    private String appClass;

    private String appName;

    private static final long serialVersionUID = 1L;
}
